import { Button, Field, Form, NavBar, Tabbar, TabbarItem } from 'vant'
import Vue from 'vue'
import VueRouter from 'vue-router'
import Find from '@/views/Find'
import Home from '@/views/Home'
import Question from '@/views/Question'
import My from '@/views/Login/My'
import Login from '@/views/Login/Login'
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(VueRouter)
Vue.use(NavBar)
Vue.use(Form)
Vue.use(Field)
Vue.use(Button)
const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/find',
    component: Find
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/question',
    component: Question
  },
  {
    path: '/my',
    component: My
  },
  {
    path: '/login',
    component: Login
  }
]

const router = new VueRouter({
  routes
})

export default router
